package com.cpecc.dao.wuzi;

import javax.annotation.Resource;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.stereotype.Repository;

import com.cpecc.model.wuzi.PanDian;

@Repository
public class PanDianDao {

	@Resource
	private SessionFactory sessionFactory;
	
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	public void save(PanDian panDian){
		Session session=sessionFactory.getCurrentSession();
		session.save(panDian);
		session.flush();
	}
}
